package asteroids.model.programs.binaryexpression;

import asteroids.model.programs.Expression;
import asteroids.model.programs.Program;
import exception.IllegalOperandException;

public class GreaterThan extends BinaryExpression<Boolean> {

	public GreaterThan(Expression<?> left, Expression<?> right)
			throws IllegalOperandException {
		super(left, right);
	}

	@Override
	public Boolean getValue(Program program) {
		if(((Double)(getLeftOperand()).getValue(program)) > ((Double)(getRightOperand()).getValue(program)))
			return true;
		return false;
	}


}
